package com.jiuyi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jiuyi.entity.Setmeal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * DATA: 2022/10/19
 * Author: 晨夕
 */
@Mapper
public interface SetmealMapper extends BaseMapper<Setmeal> {
    //查看分类是否绑定套餐
    Setmeal selectCategoryInSetmeal(@Param("ids")Long ids);
    //分页查询套餐
    List<Setmeal> selectSetmealList(@Param("i")int i, @Param("pageSize")int pageSize,@Param("name") String name);
    //查询套餐个数
    int selectSetmealCount(@Param("name")String name);
    //根据id查询状态
    int selectStatusById(@Param("id")Long id);
    //停售套餐
    void updateStatusById(@Param("ids")Long[] ids);
    //起售套餐
    void updateStatusByIds(@Param("ids")Long[] ids);
    //根据category_id查询套餐集合
    List<Setmeal> selectListById(@Param("categoryId") Long categoryId);
}
